package net.wanho.service.impl;

import net.wanho.entity.Student;
import net.wanho.exception.StudentExistsException;
import net.wanho.service.StudentService;
import org.springframework.stereotype.Service;

/**
 * Author：汤小洋
 * Date：2024-08-12 11:31
 * Description：<描述>
 */
@Service
public class StudentServiceImpl implements StudentService {
    @Override
    public void add(Student stu) throws StudentExistsException {
        if ("admin".equals(stu.getName())){
            throw new StudentExistsException("学生已存在");
        }
        // 调用Dao层
        // todo....
    }
}
